package com.fcscs.cservice.gwt.server;

import java.util.List;
import java.util.Map;

import com.fcscs.core.gwt.server.FcsRemoteServiceServlet;
import com.fcscs.core.system.ApplicationContextHolder;
import com.fcscs.core.util.CommonUtil;
import com.fcscs.cservice.common.CServiceCommonEnums.EditableCategoryEnum;
import com.fcscs.cservice.domain.AuthenticationConfig;
import com.fcscs.cservice.domain.ConstantsLanguageValue;
import com.fcscs.cservice.domain.Country;
import com.fcscs.cservice.domain.DedicatedVideoConfig;
import com.fcscs.cservice.domain.ExpressCheckInConfig;
import com.fcscs.cservice.domain.FieldEditability;
import com.fcscs.cservice.domain.HouseKeepingConfig;
import com.fcscs.cservice.domain.IGuestUserProfileView;
import com.fcscs.cservice.domain.IGuestUserView;
import com.fcscs.cservice.domain.InterfaceConfig;
import com.fcscs.cservice.domain.InterfaceConfiguration;
import com.fcscs.cservice.domain.Language;
import com.fcscs.cservice.domain.Nationality;
import com.fcscs.cservice.domain.PaymentMethod;
//import com.fcscs.cservice.domain.ReservationStatus;
import com.fcscs.cservice.domain.RoomStatus;
import com.fcscs.cservice.domain.State;
import com.fcscs.cservice.domain.Title;
import com.fcscs.cservice.domain.model.CountryView;
import com.fcscs.cservice.domain.model.EditabilityConf;
import com.fcscs.cservice.domain.model.ReservationConfView;
import com.fcscs.cservice.domain.model.StateView;
import com.fcscs.cservice.gwt.client.CServiceCommonService;
import com.fcscs.cservice.service.CServiceCommonManager;
import com.google.gwt.user.client.rpc.AsyncCallback;

@SuppressWarnings("serial")
public class CServiceCommonServiceImpl extends FcsRemoteServiceServlet implements CServiceCommonService {
	private CServiceCommonManager ccMgr = (CServiceCommonManager)ApplicationContextHolder.getBeanFromContext("cServiceCommonManager");

	public List<CountryView> getCountryViewList(long propId) {
		return ccMgr.getCountryViewList(propId);
	}

	public List<StateView> getStateViewList(long countryId) {
		return ccMgr.getStateViewList(countryId);
	}

	public ReservationConfView getRsvConfView(long propId) {
		return ccMgr.getRsvConfView(CommonUtil.getUserContext().getOrgId(), propId);
	}

	@Override
	public List<Country> getCountryList(long propId) {
		return ccMgr.getCountryList(propId);
	}

	@Override
	public List<State> getStateList(long countryId) {
		return ccMgr.getStateList(countryId);
	}

	@Override
	public List<Title> getTitleList(long propId) {
		return ccMgr.getTitleList(propId);
	}

	@Override
	public List<Language> getLanguageList(long propId) {
		return ccMgr.getLanguageList(propId);
	}

	@Override
	public List<PaymentMethod> getPayMethodList(long propId) {
		return ccMgr.getPayMethodList(propId);
	}

	@Override
	public List<Nationality> getNationalityList(long propId) {
		return ccMgr.getNationalityList(propId);
	}

	@Override
	public List<RoomStatus> getRoomStatusList(long propId) {
		return ccMgr.getRoomStatusList(propId);
	}

/*	@Override
	public List<ReservationStatus> getRsvStatusList(long propId) {
		return ccMgr.getRsvStatusList(propId);
	}*/

	@Override
	public Country saveCountry(Country country) {
		return ccMgr.saveCountry(country);
	}

	@Override
	public State saveState(State state) {
		return ccMgr.saveState(state);
	}

	@Override
	public Title saveTitle(Title title) {
		return ccMgr.saveTitle(title);
	}

	@Override
	public Language saveLanguage(Language language) {
		return ccMgr.saveLanguage(language);
	}

	@Override
	public PaymentMethod savePayMethod(PaymentMethod payMethod) {
		return ccMgr.savePayMethod(payMethod);
	}

	@Override
	public Nationality saveNationality(Nationality nationality) {
		return ccMgr.saveNationality(nationality);
	}

	@Override
	public RoomStatus saveRoomStatus(RoomStatus roomStatus) {
		return ccMgr.saveRoomStatus(roomStatus);
	}

/*	@Override
	public ReservationStatus saveReservationStatus(ReservationStatus reservationStatus) {
		return ccMgr.saveReservationStatus(reservationStatus);
	}*/

	@Override
	public boolean isCountryTaken(long propId, String country, Long id) {
		return ccMgr.isCountryTaken(propId, country, id);
	}

	@Override
	public boolean isStateTaken(long propId, long countryId, String state, Long id) {
		return ccMgr.isStateTaken(propId, countryId, state, id);
	}

	@Override
	public boolean isTitleTaken(long propId, String title, Long id) {
		return ccMgr.isTitleTaken(propId, title, id);
	}

	@Override
	public boolean isLanguageTaken(long propId, String language, Long id) {
		return ccMgr.isLanguageTaken(propId, language, id);
	}

	@Override
	public boolean isNationalityTaken(long propId, String nationality, Long id) {
		return ccMgr.isNationalityTaken(propId, nationality, id);
	}

	@Override
	public boolean isPayMethodTaken(long propId, String method, Long id) {
		return ccMgr.isPayMethodTaken(propId, method, id);
	}

	@Override
	public boolean isRsvStatusTaken(long propId, String status, Long id) {
		return ccMgr.isRsvStatusTaken(propId, status, id);
	}

	@Override
	public boolean isRoomStatusTaken(long propId, String status, Long id) {
		return ccMgr.isRoomStatusTaken(propId, status, id);
	}

	@Override
	public boolean isPropertyConfTaken(long orgId, long propId, Long id) {
		return ccMgr.isPropertyConfTaken(orgId, propId, id);
	}

	@Override
	public EditabilityConf getEditabilityConf(long propId, List<EditableCategoryEnum> categories) {
		return ccMgr.getEditabilityConf(CommonUtil.getUserContext().getOrgId(), propId, categories);
	}

	@Override
	public List<FieldEditability> updateFieldEditability(List<FieldEditability> fieldEditList) {
		return ccMgr.updateFieldEditability(fieldEditList);
	}

	@Override
	public boolean deleteCountry(Country country) {
		return ccMgr.deleteCountry(country);
	}

	@Override
	public void permDeleteCountry(Country country) {
		ccMgr.permDeleteCountry(country);
	}

	@Override
	public boolean deleteState(State state) {
		return ccMgr.deleteState(state);
	}

	@Override
	public void permDeleteState(State state) {
		ccMgr.permDeleteState(state);
	}

	@Override
	public boolean deleteTitle(Title title) {
		return ccMgr.deleteTitle(title);
	}

	@Override
	public void permDeleteTitle(Title title) {
		ccMgr.permDeleteTitle(title);
	}

	@Override
	public boolean deleteLanguage(Language language) {
		return ccMgr.deleteLanguage(language);
	}

	@Override
	public void permDeleteLanguage(Language language) {
		ccMgr.permDeleteLanguage(language);
	}

	@Override
	public boolean deleteNationality(Nationality nationality) {
		return ccMgr.deleteNationality(nationality);
	}

	@Override
	public void permDeleteNationality(Nationality nationality) {
		ccMgr.permDeleteNationality(nationality);
	}

	@Override
	public boolean deletePayMethod(PaymentMethod method) {
		return ccMgr.deletePayMethod(method);
	}

	@Override
	public void permDeletePayMethod(PaymentMethod method) {
		ccMgr.permDeletePayMethod(method);
	}

/*	@Override
	public boolean deleteRsvStatus(ReservationStatus status) {
		return ccMgr.deleteRsvStatus(status);
	}

	@Override
	public void permDeleteRsvStatus(ReservationStatus status) {
		ccMgr.permDeleteRsvStatus(status);
	}*/

	@Override
	public boolean deleteRoomStatus(RoomStatus status) {
		return ccMgr.deleteRoomStatus(status);
	}

	@Override
	public void permDeleteRoomStatus(RoomStatus status) {
		ccMgr.permDeleteRoomStatus(status);
	}

	@Override
	public InterfaceConfiguration saveInterfaceConf(InterfaceConfiguration conf) {
		return ccMgr.saveInterfaceConf(conf);
	}

	@Override
	public InterfaceConfiguration getInterfaceConf(long propId) {
		return ccMgr.getInterfaceConf(CommonUtil.getUserContext().getOrgId(), propId);
	}

	@Override
	public List<IGuestUserView> getListIGuestUserView() {
		return ccMgr.getListIGuestUserView();
	}
	//iGuest Authen
		@Override
		public AuthenticationConfig SaveAuthen(AuthenticationConfig authen){
			return ccMgr.SaveAuthen(authen);
		}
	// MultiLanguage
	@Override
	public Map<String, String> getLanguageMap() {
		// TODO Auto-generated method stub
		return ccMgr.getLanguageMap();
	}

	@Override
	public IGuestUserProfileView getIGuestUserProfileView() {
		// TODO Auto-generated method stub
		return ccMgr.getIGuestUserProfileView();
	}

	@Override
	public ExpressCheckInConfig saveExpressCheckInConfig(
			ExpressCheckInConfig expressCheckIn) {
		// TODO Auto-generated method stub
		return ccMgr.saveExpressCheckInConfig(expressCheckIn);
	}

	@Override
	public ExpressCheckInConfig getExpressCheckInConfig(long id) {
		// TODO Auto-generated method stub
		return ccMgr.getExpressCheckInConfig(id);
	}

	@Override
	public AuthenticationConfig getAuthen(long propId, long orgId) {
		// TODO Auto-generated method stub
		return ccMgr.getAuthenticationConfig(propId,orgId);
	}

	@Override
	public DedicatedVideoConfig getDelicatedVideo(long propId, long orgId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public DedicatedVideoConfig saveDelicatedVideo(
			DedicatedVideoConfig delicatevideo) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ConstantsLanguageValue saveConstantsLanguageValue(
			ConstantsLanguageValue constants) {
		// TODO Auto-generated method stub
		return ccMgr.saveConstantsLanguageValue(constants);
	}

	@Override
	public List<ConstantsLanguageValue> getListConstantsLanguage(long propId,
			long orgId, String constants) {
		// TODO Auto-generated method stub
		return  ccMgr.getListConstantsLanguage(propId,orgId, constants);
	}

	@Override
	public HouseKeepingConfig saveHousepeepingConfig(
			HouseKeepingConfig currentHousekeepingConf) {
		// TODO Auto-generated method stub
		return ccMgr.saveHousepeepingConfig(currentHousekeepingConf);
	}

	@Override
	public HouseKeepingConfig getHousekeepingConfig(long propertyId) {
		// TODO Auto-generated method stub
		return ccMgr.getHousekeepingConfig(propertyId);
	}

	@Override
	public InterfaceConfig getInterfaceConfig(Long propertyId) {
		// TODO Auto-generated method stub
		return ccMgr.getInterfaceConfig(propertyId);
	}

	@Override
	public InterfaceConfig saveInterfaceConfig(InterfaceConfig currentInterConf) {
		// TODO Auto-generated method stub
		return ccMgr.saveInterfaceConfig(currentInterConf);
	}
	
}
